package com.sgcc.manager.sql.util;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.StringUtils;


/**
 * @author kaynezhang
 * 
 */
public class WebUtils {
	/**
	 * 从request里获得参数，如果参数不存在，返回""
	 * @param request HttpServletRequest
	 * @param name String
	 * @return String
	 */
	public static String getStrParamOrEmpty(HttpServletRequest request,String key) {
		Object toReturn = null;
		if (null != request) {
			toReturn = request.getParameter(key);
		} 
		if(toReturn!=null){
			return String.valueOf(toReturn);
		}
		return "";
	}
	
}
